package org.xlx.xlx_oa.meet.api;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.xlx.xlx_oa.common.ResponseBean;
import org.xlx.xlx_oa.meet.domain.dto.MeetRoomDto;
import org.xlx.xlx_oa.meet.domain.vo.MeetRoomVo;

import java.util.List;

@ApiImplicitParams(value = {
        @ApiImplicitParam(name = "x-request-id", value = "${clientTraceId}",
                paramType = "header", dataType = "String", dataTypeClass = String.class),
        @ApiImplicitParam(name = "Authorization", value = "${BearerToken}",
                paramType = "header", dataType = "String", dataTypeClass = String.class, required = false)
})
@ApiResponses(value = {
        @ApiResponse(code = 400, message = "Bad Request"),
        @ApiResponse(code = 401, message = "Authentication Error"),
        @ApiResponse(code = 403, message = "Authorization Error"),
        @ApiResponse(code = 500, message = "Internal Server Error"),
        @ApiResponse(code = 503, message = "Service Unavailable")
})
public interface MeetRoomApi {
    @PostMapping("/save")
    ResponseBean<Boolean> saveMeetRoom(@RequestBody MeetRoomVo roomVo);

    @GetMapping("/remove/{id}")
    ResponseBean<Boolean> removeMeetRoom(@PathVariable(value = "id") Long id);

    @GetMapping("/list")
    ResponseBean<List<MeetRoomDto>> getListRooms(@RequestBody MeetRoomVo roomVo);

    @GetMapping("/detail/{id}")
    ResponseBean<MeetRoomDto> getRoom(@PathVariable(value = "id") Long id);
}
